home *** CD-ROM | disk | FTP | other *** search
- #include <Movies.h>
-
- #include "QTUtilities.h"
- #include "QTFlatten.h"
- #include "CreateMovie.h"
- #include "ComFramework.h"
-
- /************************************************************
- * *
- * *
- * QTSave_FlattenMovie *
- * Save and flatten a movie resource into a file. *
- * *
- * *
- *************************************************************/
-
- OSErr QTSave_FlattenMovie (Movie theMovie, FSSpec *myFile)
- {
- Movie aMovie = NULL;
- OSErr myErr = noErr;
-
- // The FlattenMovieData function creates a new movie file and creates a new movie
- // that contains all of its movie data.
- // NOTE: Unlike the FlattenMovie, this function does not add the new movie resource
- // to the new movie file. Instead, the FlattenMovieData function returns the new
- // movie to your application. Your application must dispose of the returned movie.
-
- aMovie = FlattenMovieData(theMovie, /* movie specifier */
- flattenAddMovieToDataFork | /* moive flatten flags */
- flattenForceMovieResourceBeforeMovieData,
- myFile, /* FSSpec for creted movie */
- FOUR_CHAR_CODE('TVOD'), /* creator */
- smSystemScript, /* script tag */
- createMovieFileDeleteCurFile | /* creation flags */
- createMovieFileDontCreateResFile);
-
- myErr = GetMoviesError();
- CheckError( myErr, "FlattenMovie error" );
-
- if (aMovie != NULL)
- DisposeMovie(theMovie);
-
- return myErr;
- }